let chren = args.form;
for(let item of chren){
    let id = item.id;
    lib.dbUpdate(`UPDATE inventory i
LEFT JOIN adjustment_order_product aop ON i.trade_name = aop.new_prd_name 
AND i.sku = aop.new_sku 
AND i.shop = aop.new_shop 
AND i.fnsku = aop.new_fnsku 
SET i.availble_num = (
	IF
		( i.availble_num IS NULL, 0, i.availble_num ) +
	IF
	( aop.adjustment_amount IS NULL, 0, aop.adjustment_amount )) 
WHERE
	aop.id = ? 
	AND i.del_flag = 0 
	AND aop.del_flag = 0`,id);
	lib.dbUpdate(`UPDATE inventory i
LEFT JOIN adjustment_order_product aop ON i.id = aop.inventory_id
SET i.availble_num = (
	IF
		( i.availble_num IS NULL, 0, i.availble_num ) -
	IF
	( aop.adjustment_amount IS NULL, 0, aop.adjustment_amount )) 
WHERE
	aop.id = ? 
	AND i.del_flag = 0 
	AND aop.del_flag = 0`,id)
}
1